package com.qinglei.recoup.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 事件处理表
 *
 * @author syp
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_event_proc")
@ApiModel(value = "EventProc对象", description = "事件处理表")
public class EventProc implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final int STATUS_HAPPEN = 1;
    public static final int STATUS_PROCESSING = 2;
    public static final int STATUS_FINISHED = 3;
    public static final int STATUS_MISSED = 4;

    public static final int OPTION_OTHER = 999;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "事件ID")
    private Long eventId;

    @ApiModelProperty(value = "床位ID")
    private Integer bedId;

    @ApiModelProperty(value = "异常发生时间")
    private LocalDateTime happenTime;

    @ApiModelProperty(value = "接单时间")
    private LocalDateTime takeTime;

    @ApiModelProperty(value = "接单前等待时间 单位秒")
    private Integer waitTime;

    @ApiModelProperty(value = "完成时间")
    private LocalDateTime finishTime;

    @ApiModelProperty(value = "处理花费时间 单位秒")
    private Integer procTime;

    @ApiModelProperty(value = "状态 1-发生 2-已接单 3-处理完")
    private Integer status;

    @ApiModelProperty(value = "接单人ID")
    private Long takeUserId;

    @ApiModelProperty(value = "完成人ID")
    private Long finishUserId;

    @ApiModelProperty(value = "现场状况，值见字典表")
    private Integer siteOption;

    @ApiModelProperty(value = "处置报告")
    private String procReport;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;

    @ApiModelProperty(value = "异常结束时间（漏掉时间）")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "个数统计")
    @TableField(exist = false)
    private Long count;


}
